R Calculate Moving Average, Maximum, Median & Sum of Time Series (6 Examples) | zoo Package & Plot